package cn.tedu.boot011.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class BmiController {

    @RequestMapping("/bmi")
    @ResponseBody
    public String bmi(double h,double w){
        double v = (w/(h*h));
        if(v<18.5){
            return "兄弟你瘦了";
        }
        if(v<24){
            return "正常";
        }
        if(v<28){
            return "微胖";
        }
        return "太胖";
    }

}
